package repository.relsys.domainmodel.ltool.pojos;

import java.util.Collection;

import java.util.LinkedList;

import repository.relsys.domainmodel.general.ResourceCls;
import repository.relsys.domainmodel.ltool.interfaces.MobileDevice;
import repository.relsys.domainmodel.ltool.interfaces.OperetingSystem;
import repository.relsys.domainmodel.ltool.interfaces.TechnicalInformation;
import thewebsemantic.Namespace;
import thewebsemantic.RdfProperty;
import thewebsemantic.RdfType;

@Namespace("http://diplomski.nelakolundzija.org/LTontology.rdf#")
@RdfType("TechnicalInformation")
public class TechnicalInformationCls extends ResourceCls implements
		TechnicalInformation {

	private String launchedTime;
	private Collection<MobileDevice> mobileDevices=new LinkedList<MobileDevice>();
	private Collection<OperetingSystem> operetingSystems=new LinkedList<OperetingSystem>();
	private boolean registration;
	private boolean isOpenSource;
	private String version;

	@Deprecated
	public TechnicalInformationCls(){
		super();
	}
	@Deprecated
	public TechnicalInformationCls(String uri){
		super(uri);
	}


	@RdfProperty("http://diplomski.nelakolundzija.org/LTontology.rdf#launched")
	public String getLaunchedTime() {

		return launchedTime;
	}

	@RdfProperty("http://diplomski.nelakolundzija.org/LTontology.rdf#version")
	public String getVersion() {

		return version;
	}

	@RdfProperty("http://diplomski.nelakolundzija.org/LTontology.rdf#supportedMobileDevice")
	public Collection<MobileDevice> getsupportedMobileDevice() {

		return mobileDevices;
	}

	@RdfProperty("http://diplomski.nelakolundzija.org/LTontology.rdf#supportedOS")
	public Collection<OperetingSystem> getsupportedOS() {

		return operetingSystems;
	}

	@RdfProperty("http://diplomski.nelakolundzija.org/LTontology.rdf#openSource")
	public boolean isOpenSource() {

		return isOpenSource;
	}

	public void isOpenSource(boolean isOpenSource) {
		this.isOpenSource = isOpenSource;

	}

	@RdfProperty("http://diplomski.nelakolundzija.org/LTontology.rdf#registration")
	public boolean registration() {

		return registration;
	}

	public void registration(boolean registration) {
		this.registration = registration;

	}

	public void setLaunchedTime(String time) {
		if (time != null)
			this.launchedTime = time;

	}

	public void setVersion(String v) {
		if (v != null)
			this.version = v;

	}

	@Override
	public void addOS(OperetingSystem os) {
		if (os != null)
			getsupportedOS().add(os);

	}

	@Override
	public void setsupportedMobileDevice(Collection<MobileDevice> md) {
		// TODO Auto-generated method stub
		this.mobileDevices = md;
	}

	@Override
	public void setsupportedOS(Collection<OperetingSystem> os) {
		// TODO Auto-generated method stub
		this.operetingSystems = os;
	}

	@Override
	public void addMD(MobileDevice md) {
		if (md != null)
			getsupportedMobileDevice().add(md);

	}

}
